package day06;
import java.util.Arrays;
import java.util.Scanner;
import sun.plugin.AppletStatusListener;

public class MethodDemo {
    public static void main(String[] args) {
         //say();
        //sayHi("李延");
        //sayHi("高启强");
        //sayHello("李延",25);
        //sayHello("高启强",50);
        //double num = getNum();
        /*
        Scanner scan = new Scanner(System.in);
        System.out.println("计算器(只能算加法)");
        System.out.println("请输入第一组数字");
        int b = scan.nextInt();
        System.out.println("请输入第二组数字");
        int c = scan.nextInt();
        int a =plus(b,c);
        System.out.println(b+"+"+c+"="+a);

         */
        /*
        int[] a =testArray(6,66);
        Arrays.sort(a);
        for (int i = 0;i<a.length;i++){
            System.out.println(a[i]);
        }
         */
        /*
        sayHello("美女",26);
        sayHello("吴刚",45);
         */
        /*
        aMethod();
        System.out.println("子");


    }
    public static void say(){
        System.out.println("大家好,我叫Ly,今年24岁了");
    }
    public static void sayHi(String name){
        System.out.println("大家好,我叫"+name+",今年24岁了");
    }
    public static void sayHello(String name,int age){
        if (age>28){
            return;
        }
        System.out.println("大家好,我叫"+name+",今年"+age+"岁了");
    }
    public static double getNum(){
        return 0.66;
    }
    public static int plus(int num1,int num2){
        int num = num1+num2;
        return num;
    }
    public static int[] testArray(int len,int max){
        int[] arr = new int[len];
        for (int i = 0;i<arr.length;i++){
            arr[i] =(int)(Math.random()*(max+1));
        }
        return arr;
    }
    public static void aMethod(){
        System.out.println("我");
        bMethod();
        System.out.println("你");
        cMethod();
    }
    public static void bMethod(){
        System.out.println("套");
    }
    public static void cMethod(){
        System.out.println("猴");

         */
        say();
    }
    public static void say(){
        System.out.println("大家好我叫李延,今年24岁啦");
    }

}
